<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">

<title>BUG查询系统-账户中心</title>

<link rel="stylesheet" href="PlugIns/layer/css/layui.css" type="text/css"></link>
<script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="PlugIns/layer/lay/dest/layui.all.js"></script>
</head>

<body>
	<div class="layui-tab layui-tab-card">
		<ul class="layui-tab-title">
			<li class="layui-this">修改个人信息</li>
			<li>修改密码</li>
			<li>修改邮箱</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">1</div>
			<div class="layui-tab-item">

				<form action="userInfo/updatePwd" class="layui-form" method="post">

					<div class="layui-form-item">
						<label class="layui-form-label">手机号码</label>
						<div class="layui-input-block">
							<input type="text" name="title" class="layui-input phone" style="width: 200px" required lay-verify="required" placeholder="请输入手机号码" autocomplete="off">
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">新密码</label>
						<div class="layui-input-inline">
							<input type="password" name="password" required lay-verify="required" placeholder="新密码" autocomplete="off" class="layui-input">
						</div>
					</div>

					<div class="layui-form-item">
						<label class="layui-form-label">验证码</label>
						<div class="layui-input-inline">
							<input type="password" name="password" required lay-verify="required" placeholder="验证码" autocomplete="off" class="layui-input">
						</div>

						<div class="layui-form-mid layui-word-aux getCheckPhone" style="cursor: pointer;color: red;">获取验证码</div>
					</div>


					<div class="layui-form-item">
						<div class="layui-input-block">
							<button class="layui-btn" lay-submit lay-filter="formDemo">修改密码</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>

				</form>
			</div>

			<div class="layui-tab-item">3</div>
		</div>
	</div>

	<script type="text/javascript">
		$(function(){
			$(".getCheckPhone").on("click",function(){
				//获取手机号码
				var phone = $(".phone").val().trim();
				
				console.log(phone);
				if(phone.length == 0){
					layer.msg("请输入手机号码");
				}else{
					//异步请求发送验证码
					$.ajax({
						url:,
						success:function(msg){
							if(msg == 0){
								layer.msg("手机号码错误，请输入正确的手机号码");
							}else if(msg == 1){
								layer.msg("验证码已发送，请及时查看!");
							}
						}
					});
				}
			});			
		});
	</script>


</body>
</html>
